package top.hcode.hoj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import top.hcode.hoj.pojo.entity.course.LessonWorkQuestion;

public interface LessonWorkQuestionMapper extends BaseMapper<LessonWorkQuestion> {

    @Select("select max(sort_order) from lesson_work_question where lesson_id = #{lessonId} and work_type = #{workType}")
    Integer getNextSortOrder(@Param("lessonId") Long lessonId, @Param("workType") String workType);
}
